﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SportStore.Models.Abstract;
using SportStore.Models.Concrete;
using SportStore.Models.Entities;

namespace SportStore.Framework
{
    public static class HelperMethods
    {
        static IRepository repository = new EFRepository();
        public static Category CategoryById(int id)
        {
            var category = repository.Categories.FirstOrDefault(c=>c.CategoryID==id);
            return (Category)category;
        }
    }
}